package com.wbao.dianniu.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;

import com.umeng.analytics.MobclickAgent;
import com.wbao.dianniu.R;


/**
 * 与我相关
 * 
 * @author yejianjun
 *
 */
public class MyInfoActivity extends BaseActivity implements OnClickListener {

	
	private RelativeLayout questionRL,answerRL,shieldRL,blacklistRL,qrCodeRL;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentLayout(R.layout.activity_my_info);
		setTitleName(getResources().getString(R.string.related_to_me));
		
		init();
		
	}

	private void init() {
		// TODO Auto-generated method stub
		questionRL = (RelativeLayout) findViewById(R.id.rl_my_info_question);
		answerRL = (RelativeLayout) findViewById(R.id.rl_my_info_answer);
		shieldRL = (RelativeLayout) findViewById(R.id.rl_my_info_shield);
		blacklistRL = (RelativeLayout) findViewById(R.id.rl_my_info_blacklist);
		qrCodeRL = (RelativeLayout) findViewById(R.id.rl_my_info_qrcode);
		
		questionRL.setOnClickListener(this);
		answerRL.setOnClickListener(this);
		shieldRL.setOnClickListener(this);
		blacklistRL.setOnClickListener(this);
		qrCodeRL.setOnClickListener(this);
		
	}
	
	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.rl_my_info_question:
//			intent(MyQuestionActivity.class);
			break;
		case R.id.rl_my_info_answer:
			intent(MyAnswerActivity.class);
			break;
		case R.id.rl_my_info_shield:
			intent(MyShieldActivity.class);
			break;
		case R.id.rl_my_info_blacklist:
			intent(MyBlacklistActivity.class);
			break;
		case R.id.rl_my_info_qrcode:
			intent(MyQRActivity.class);
			break;
		default:
			break;
		}
	}
	
	private void intent(Class cls){
		Intent intent = new Intent();
		intent.setClass(MyInfoActivity.this, cls);
		startActivity(intent);
	}
	public void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
		}
		public void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
		}
}
